This project is mainly lingo/oop- based rather than frame-based, and its functionality relies heavily on naming conventions. There are 11 screens, each of which uses 2-3 frames, except the Intro animation which runs only once through 200 or so frames. The interface layout is as follows:
Intro
|
Credits - Menu - Index
| /
| /
Museum - Subject - Zoom
|
ABC
------ | ------
| | |
Puzzle Shapes Coloring
The entry point is Front, the quit point is Credits.
INITIALIZATION
The projector (created from"INTRO.DIR" in the NO_TEST folder) inititalizes the hdPath global, setting it to ( the moviePath & "DATA/" ) before playing frame "SETUP" (5) of the CEZANNE.DIR file in the MEDIA folder on the CD.
The "runObjectSetUp" handler in frame "SETUP" of CEZANNE.DIR initializes global variables and sets up the child objects for buttons, screens and paintings (see below). It also opens the FILL xLib and creates the Museum lists from the saved preferences (castLib) for use in creating offspring of the "PAINTINGS" parent script.
After the frame (and "runObjectSetUp" framescript) is played, playback returns to the the intro sequence in the projector on the hard drive (INTRO.DIR being the file from which the projector was created). When the intro sequence is done, the CEZANNE.DIR file is opened again, and play starts at frame 1. The exitframe script in frame 1 creates "FLIPPER" offspring (for use on the main menu screen) and sends the playback to the "menu" frame.
The hdPath variable is later used for saving preferences (text and bitmaps) to the SAVED.CST castLib in the user's hard drive. The projector also checks for QuickTime, sound volume, and color depth, and finds the cdPath.
SCREENS PARENT
Each screen's properties (background art file name, puppet channels, frameName, button list, exit and entry functions, etc.) are stored in child objects of the "SCREENS" parent script. All the (11) screen objects is stored in a list "gScreenList" and upon going to a screen, its corresponding object is put into the global "gScreen". The handler for changing screens is generally "changeScreen gScreen, destScreen" which closes all buttons and puppets for the current "gScreen", sets gScreen = destScreen, and opens puppets and buttons for the new gScreen before going there. Certain screens also have frame scripts for entry functions (e.g. the ABC screen plays an audio clip upon entry and again each time the painting is changed).
BUTTONS PARENT
Navigation between paintings and between screens is handled by buttons which are (with one or two exceptions) offspring of the "BUTTONS" parent script. Each screen (object) has an associated button list (property), a propList of the button objects. This button list is used on enterFrame to update the rollover states of each active button as well as to determine which button (the clickOn) has been pressed.
The art (castmembers) for each button (in the BTNS castLib) are named as follows: normal state: aBtn, rollover: aBtnRoll, DownState: aBtnDn, Inactive: aBtnCold. Registration points must be aligned. Each button's specific function is stored in the object as the "btnAction" property and is called when the button is pressed, after the button's rollstate is updated by the "pressDn the clickOn" score script. Certain buttons are also stored as globals so as to be easily accessible from other parent/movie scripts (e.g. gABCbtn, gTruckBtn, etc.)
PAINTINGS PARENT
The properties (ABC letter, museum location, picture name, dimensions, etc) of each painting are contained in child objects of the "PAINTINGS" parent script, and those objects are stored in the prop list "gMainArtList" [ #P1: <object id>, #P2: <object id>, etc]. As a painting becomes current (usually through the "changeScreenArt gScreen, dest" handler), its object is put into the global "gPainting" to make it easily acessible to handlers of other parent scripts.
FLIPPER PARENT
The "Flipper" parent script manages the flipping of the menu pictures on the main menu screen and determines which painting has been selected when the user clicks one of those pictures by checking the name of the castmember that was clicked.
Currently the images change one every 90 seconds.
PUZZLE PARENT
Each time you change to a new puzzle (changeScreenArt) from Easy to Hard or to a new gPainting, a new object is created as gPuzz, storing the number of puzzle pieces (a property of the Painting object), initial piece locations, etc.
When the user arrives at the puzzle screen, all the puzzle pieces as well as the grey grids are at the same loc. (point(411,209) i think), and the piece castMembers are registered to be in their "completed" position at that loc. The puzzle then "shuffles" and the pieces are moved one at a time to "ready to play" loc. The "ready to play" locs are different depending on the number of pieces in the puzzle (ranging from 6 to 30); these locs are stored in lists in the parent script. Once all the pieces are placed at point(411,209), the puzzle is done, and the completed picture shows as sprite 48.
MUSEUM MOVIE SCRIPT
Not a parent script, but a separate movie script for the museum handlers. These handlers access the following lists to manage and save user input: gMuseumList, gBinList, gWallList1, gWallList2, etc. There are 5 walls (or galleries) in the museum, so paintings in the museum (put there by the user) will either be in the gBinList or in one of the 5 gWallLists. The gBinList is a linear list, but the gWallLists are prop lists. If a painting has been placed on a wall, the specific gWallList retains the painting's name and its point(x,y) location.
The gMuseumList is a prop list containing names of all paintings in the museum as well as its current location [#T1: #bin, #P3: #2, etc.] This list is necessary for properly updating the gTruckBtn (subject screen) for each painting. In other words, the museum "state" of a painting is stored as a property of the PAINTING child object to be accessed by the handlers of the SCREEN parent script in updating the gTruckBtn for a given painting.
Each painting is dragged around as a member of the mMover sprite. The mMover sprite is constrained by the rect of sprite 2, which varies depending on which piece of art is being moved around. This variation is required in order that the paintings never hang down into the blue bottom margin.
ZOOM
Large zoom images are 750% of the small picture on the right of the screen. The correlation is not perfect, but it's pretty close. Adjustments can be made by changing the initial loc of sprite 11 (the large image) or the "dragFrame" sprite.
The Zoom screen is the only place where the Help sprite varies - it's in channel 22 instead of sprite 6 in order that it sits in front of the "background" image
HELP
Help plays through filmloops in sprite the helpChan of gScreen. (Note that the Zoom screen is the only one in which the helpChan is not 6.) The checkHelp handler refers to a property of gScreen which lists the channels for which help must play on rollover, ane their respective filmLoop names.
Help codes (gHelpON) indicate which help filmloop should be playing.
HELP OFF = 0
HELP IN PROCESS OF TURNING OFF = 50
ENTERING A SECTION = 60
ENTERING PUZZLE = 64 (so as not to be aborted by sound of shufflePuzz)
TRUCK ANIM PLAYING = 70
Other help codes indicate the rollover channel of the button for which help must play.